package entity;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description
 * @Author 李楚鹏
 * @Date 2024/12/11 15:20
 **/

public class Pet {
    private static final Logger LOGGER= LoggerFactory.getLogger(Pet.class);

    public Pet(){}
    private String name;
    private int age;

    public void setAge(int age){
        LOGGER.debug("Pet对象的setAge方法被调用!参数age={}",age);
        this.age=age;
    }

    public void introduce(){
        System.out.println("我是'"+this.name+"',今年"+this.age+"岁");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }
}
